import { FEvent } from "./FEvent";
import { GameLayer } from "../Enums/GameLayer";

export class ModuleEvent extends FEvent
{
    public static ClassName:string = "ModuleEvent";
	/**
     * 显示模块
     */
    public static SHOW_MODULE:string = "ShowModule";
    /**
     * 隐藏模块
     */
    public static HIDE_MODULE:string = "HideModule";
    /**
     * 销毁模块
     */
    public static DISPOSE_MODULE:string = "DisposeModule";
    /**
     * 播放完动画销毁模块
     */
    public static PLAY_DISPOSE_ANIMATION:string = "PlayDisposeAnimation";
    /**
     * 模块素材加载完成
     */
    public static LOAD_MODULE_ASSET_COMPLETE: string = "LoadModuleAssetComplete";
    
    private _moduleName:string = null;
    private _gameLayer:GameLayer = null;
    private _instanceName:string = null;

    public constructor(type:string,moduleName:string,instanceName?:string,GameLayer?:GameLayer,data?:object)
    {
        super(type,data);
        this._moduleName = moduleName;
        this._gameLayer = GameLayer;
        this._instanceName = instanceName;
    }

    public get instanceName():string{return this._instanceName;}
    public get moduleName():string{return this._moduleName;}
    public get gameLayer():GameLayer{return this._gameLayer;}
}
